package com.huluobo.user

import com.huluobo.lib_base.Res
import com.huluobo.lib_http.Const
import com.huluobo.user.entity.ApproveEntity
import com.huluobo.user.entity.LoginVideoUserEntity
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 *  Created by LC on 2025/6/30.
 */
interface ApiService {
    @POST(Const.URL_ADD_EMPLOYEE)
    fun addEmployee(@Body body: RequestBody): Flow<Res<Any>>

    @POST(Const.URL_LOGIN)
    fun login(@Body body: RequestBody): Flow<Res<Any>>

    @POST(Const.URL_ADD_APPROVE)
    fun addApprove(@Body body: RequestBody): Flow<Res<Any>>

    @GET(Const.URL_GET_ALL_APPROVE)
    fun getAllApprove(): Flow<Res<ApproveEntity>>

    @POST(Const.URL_COM_APPROVE)
    fun comApprove(@Body body: RequestBody): Flow<Res<Any>>

    @GET(Const.URL_GET_ALL_APPROVE_PAGE)
    suspend fun getApprovePage(
        @Query(Const.PARAM_PAGE) page: String, @Query(Const.PARAM_LIMIT) limit: String
    ): Res<ApproveEntity>

    @POST(Const.URL_LOGIN_VIDEO)
    fun loginVideo(@Body body: RequestBody): Flow<Res<LoginVideoUserEntity>>
}